<extend name="../Public/base" />
<block name="title"><title>回收站</title></block>
<block name="body">
    <div class="text-c">
        <form method="post" action="{:U('index')}">
            <input type="text" name="keyword" value="{$keyword}" placeholder=" 文章名称" style="width:250px" class="input-text">
            <button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </form>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <span class="l"><a href="javascript:;" onclick="dels('article_id','deleteCompletely')" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量彻底删除</a> </span>
        <span class="r">共有数据：<strong>{$count}</strong> 条</span> </div>
    <div class="mt-20">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
            <tr class="text-c">
                <th width="5%"><input type="checkbox" name="" value=""></th>
                <th width="5%">ID</th>
                <th width="5%">分类</th>
                <th width=30%">标题</th>
                <th width="5%">作者</th>
                <th width="10%">标签</th>
                <th width="5%">置顶</th>
                <th width="5%">点击数</th>
                <th width="15%">发布时间</th>
                <th width="5%">状态</th>
                <th width="10%">操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="info">
                <tr class="text-c">
                    <td><input type="checkbox" name="article_id[]" value="{$info.article_id}"></td>
                    <td>{$info.article_id}</td>
                    <td>{$cates[$info['cate_id']]['cate_name']}</td>
                    <td>{$info.title}</td>
                    <td>{$info.author}</td>
                    <td>{$info.keywords}</td>
                    <td class="td-status">
                        <eq name='info.is_top' value='1'>
                            <span class="label label-success radius">是</span>
                            <else/>
                            <span class="label radius">否</span>
                        </eq>
                    </td>
                    <td>{$info.click}</td>
                    <td>{$info.create_time|date="Y-m-d H:i:s",###}</td>
                    <td class="td-status">
                        <span class="label label-danger radius">已删除</span>
                    </td>
                    <td class="f-14">
                        <a onclick="article_recovery('{$info.article_id}')" href="javascript:;" title="恢复"><i class="Hui-iconfont">&#xe66b;</i></a>
                        <a onclick="article_deleteCompletely('{$info.article_id}')" class="ml-5" href="javascript:;" title="彻底删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
                </tr>
            </foreach>
            </tbody>
        </table>
    </div>
</block>
<block name="js">
    <script type="text/javascript">

        //文章发布
        function article_recovery(id){
            action('确认要恢复删除的文章吗？',id,"{:U('recovery')}",'article_id');
        }

        //彻底删除文章
        function article_deleteCompletely(id){
            action('确认要彻底删除的文章吗？',id,"{:U('deleteCompletely')}",'article_id');
        }

    </script>
</block>